"""
---------------------------------------------------------------------
- File: jobs.py
- Date: 2025/5/27
- Author: yangzhide
- Email: xxzjyzd@126.com
- Description: 任务函数（异步函数）
---------------------------------------------------------------------
"""
import asyncio
import time


async def task1():
    """
    一个异步任务函数
    """
    current_time = time.time()
    print(f"任务开始：{current_time:.2f}秒")
    await asyncio.sleep(2)
    end_time = time.time()
    print(f"任务结束：{current_time:.2f}秒")
    total_time = end_time - current_time
    print(f"任务耗时：{total_time:.2f}秒")
